package com.shopping.mall.core.module.attributeKey.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shopping.mall.core.module.attributeValue.entity.AttributeValue;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;
import java.util.List;

/**
* AttributeKey实体类
*
* @author zzy
* @date 2021-08-15
*/
@Data
@TableName("attribute_key")
public class AttributeKey {

    public interface insert{
    }

    public interface update{
    }

    @ApiModelProperty(value="属性id")
    @TableId(type = IdType.UUID)
    private String id;

    @TableField(exist = false)
    private String flagId;

    @ApiModelProperty(value="商品id")
    private String goodsId;

    @ApiModelProperty(value="商品规格名称")
    private String attributeKey;

    @TableField(exist = false)
    @ApiModelProperty(value="规格该规格成员列表")
    private List<AttributeValue> attributeValueList;

    @ApiModelProperty(value="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createAt;

    @ApiModelProperty(value="修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateAt;


}
